#ifndef __MOTOR_H__
#define __MOTOR_H__

#include <Arduino.h>
#include <Ticker.h>
#include<espnow.h>
#include <BasicStepperDriver.h>
#include <common/config/config.h>
#include <hardware/switch/switch.h>

#define fasttime 100
#define slowtime 250

//初始化电机
void initMotor();
//驱动电机
void powerMotor(unsigned char direction, unsigned int rpm);
//加速驱动电机
void accelerateMotor(unsigned char direction);
//关闭电机
void closeMotor();
//快速翻转电机
void flipMotor();
//周期性快速翻转电机
void tickerMotor(unsigned char dir);

#endif